-
Download the latest release v1.14.0 from this link: https://storage.googleapis.com/kubernetes-release/release/v1.14.0/bin/windows/amd64/kubectl.exe
Or if you have curl installed, use this command:
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.14.0/bin/windows/amd64/kubectl.exe
-
Add the binary in to your PATH.
-
Test to ensure the version you installed is up-to-date:
kubectl version
-
Download the latest release v1.14.0
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.14.0/bin/linux/amd64/kubectl
-
Make the kubectl binary executable.
chmod +x ./kubectl
-
Move the binary in to your PATH.
sudo mv ./kubectl /usr/local/bin/kubectl
-
Test to ensure the version you installed is up-to-date:
kubectl version
-
Download the latest release v1.14.0
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.14.0/bin/darwin/amd64/kubectl
-
Make the kubectl binary executable.
chmod +x ./kubectl
-
Move the binary in to your PATH.
sudo mv ./kubectl /usr/local/bin/kubectl
-
Test to ensure the version you installed is up-to-date:
kubectl version
https://kubernetes.io/docs/tasks/tools/install-kubectl/
src/kubernetes
- Open file 00-namespace.yml
- Define your own namespace by replacing
<namespace>
. - Create namespace:
kubectl apply -f 00-namespace.yml
kubectl apply -f 01-pod.yml
kubectl get pods -n <namespace>
Application will be available on localhost:12345
kubectl port-forward helloworld 12345:8080 -n <namespace>
kubectl delete pod helloworld -n <namespace>
kubectl port-forward service/helloworld-service 12345:8080 -n <namespace>
kubectl scale deployment/helloworld --replicas=3
kubectl set image -n <namespace> deployment/<deployment-name> <container-name>=<image>:<tag>
kubectl set image -n <namespace> deployment/helloworld helloworld=gcr.io/workshop-bielefeld/helloworld:1.0.1
kubectl create configmap special-config --from-literal=special.how=very --dry-run -o yaml
kubectl create configmap special-config --from-file=application.properties --dry-run -o yaml
kubectl create secret generic db-user-pass --from-literal=username=user --from-literal=password=123456 -o yaml --dry-run
Start proxy
kubectl proxy
Open localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:https/proxy/
in browser
Get Token
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}')
Copy&paste token for authetication