Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Enable Kubernetes

From Docker Preferences, enable Kubernetes.

...

> kubectl port-forward $(kubectl -n kube-system get pods |grep kubernetes-dashboard |awk '{print $1}') 8443:8443 --namespace=kube-system

Start the proxy

> kubectl proxy

Code Block
Starting to serve on 127.0.0.1:8001


Open your browser

Navigate to:

...

Sign in using the token previously retrieved.



Install Sample Pod

> vi nginx-example.yaml

Code Block
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  selector:
    matchLabels:
      app: nginx
  replicas: 2 # tells deployment to run 2 pods matching the template
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.7.9
        ports:
        - containerPort: 80


> kubectl apply -f nginx-example.yaml




References

...