美文网首页
learning kubernetes by minikube,

learning kubernetes by minikube,

作者: caccq | 来源:发表于2018-04-16 17:16 被阅读0次

use GUI with kubernetes

1 Run the Kubernetes Dashboard in minikube

Enable heapster, to see cluster memory and CPU usage.
minikube addons enable heapster

Start up the dashboard
minikube dashboard

This will bring up the dashboard in your browser.

localhost:~ xunyang$ minikube addons enable heapster
heapster was successfully enabled
localhost:~ xunyang$ minikube dashboard
Opening kubernetes dashboard in default browser...
screenshot_289.png

2 Explore the dashboard and look for the features it supports

Explore the cluster sections, available namespaces.

In the deployments section, try to scale, edit or delete a deployment.
try to scale the pod deployment to 6, then to 1.

3 Create a deployment from the dashboard

Create a helloworld deployment with the UI; specify an app name, and container image karthequian/helloworld:latest with 2 pods.

apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: helloworld-all-deployment
spec:
  selector:
    matchLabels:
      app: helloworld
  replicas: 2 
  template: # create pods using pod definition in this template
    metadata:
      labels:
        app: helloworld
    spec:
      containers:
      - name: helloworld
        image: karthequian/helloworld:latest
        ports:
        - containerPort: 80

See the deployment and pods running in the UI.

相关文章

网友评论

      本文标题:learning kubernetes by minikube,

      本文链接:https://www.haomeiwen.com/subject/awpekftx.html