Skip to content

Commit 82128f1

Browse files
authored
Merge branch 'master' into foxish-fix-link
2 parents 61577a2 + 791000c commit 82128f1

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

docs/getting-started-guides/kubeadm.md

+6
Original file line numberDiff line numberDiff line change
@@ -254,3 +254,9 @@ Please note: `kubeadm` is a work in progress and these limitations will be addre
254254
1. There is not yet an easy way to generate a `kubeconfig` file which can be used to authenticate to the cluster remotely with `kubectl` on, for example, your workstation.
255255

256256
Workaround: copy the kubelet's `kubeconfig` from the master: use `scp root@<master>:/etc/kubernetes/admin.conf .` and then e.g. `kubectl --kubeconfig ./admin.conf get nodes` from your workstation.
257+
258+
1. If you are using VirtualBox (directly or via Vagrant), you will need to ensure that `hostname -i` returns a routable IP address (i.e. one on the second network interface, not the first one).
259+
By default, it doesn't do this and kubelet ends-up using first non-loopback network interface, which is usually NATed.
260+
Workaround: Modify `/etc/hosts`, take a look at this [`Vagrantfile`][ubuntu-vagrantfile] for how you this can be achieved.
261+
262+
[ubuntu-vagrantfile]: https://github.com/errordeveloper/k8s-playground/blob/22dd39dfc06111235620e6c4404a96ae146f26fd/Vagrantfile#L11),
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: extensions/v1beta1
2+
kind: Deployment
3+
metadata:
4+
name: nginx-deployment
5+
spec:
6+
replicas: 4
7+
template:
8+
metadata:
9+
labels:
10+
app: nginx
11+
spec:
12+
containers:
13+
- name: nginx
14+
image: nginx:1.8 # Update the version of nginx from 1.7.9 to 1.8
15+
ports:
16+
- containerPort: 80

docs/tutorials/stateless-application/run-stateless-application-deployment.md

+24
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,30 @@ specifies that the deployment should be updated to use nginx 1.8.
9494

9595
kubectl get pods -l app=nginx
9696

97+
### Scaling the application by increasing the replica count
98+
99+
You can increase the number of pods in your Deployment by applying a new YAML
100+
file. This YAML file sets `replicas` to 4, which specifies that the Deployment
101+
should have four pods:
102+
103+
{% include code.html language="yaml" file="deployment-scale.yaml" ghlink="/docs/tutorials/stateless-application/deployment-scale.yaml" %}
104+
105+
1. Apply the new YAML file:
106+
107+
kubectl apply -f $REPO/docs/tutorials/stateless-application/deployment-scale.yaml
108+
109+
1. Verify that the Deployment has four pods:
110+
111+
kubectl get pods
112+
113+
The output is similar to this:
114+
115+
NAME READY STATUS RESTARTS AGE
116+
nginx-deployment-148880595-4zdqq 1/1 Running 0 25s
117+
nginx-deployment-148880595-6zgi1 1/1 Running 0 25s
118+
nginx-deployment-148880595-fxcez 1/1 Running 0 2m
119+
nginx-deployment-148880595-rwovn 1/1 Running 0 2m
120+
97121
### Deleting a deployment
98122

99123
Delete the deployment by name:

0 commit comments

Comments
 (0)