Skip to content

Instantly share code, notes, and snippets.

@dulao5
Last active January 25, 2019 10:51
Show Gist options
  • Save dulao5/fe33d14339b7fb7b984868f216d94a2c to your computer and use it in GitHub Desktop.
Save dulao5/fe33d14339b7fb7b984868f216d94a2c to your computer and use it in GitHub Desktop.
kubernetes basic Tutorials

https://kubernetes.io/docs/tutorials/kubernetes-basics/ Learn Kubernetes Basics

Kubernetes Deployments

https://kubernetes.io/docs/tutorials/kubernetes-basics/deploy-app/deploy-interactive/

init kube cluster

$ docker ps
CONTAINER ID        IMAGE         COMMAND                  CREATED              STATUS              PORTS               NAMES
c9a996c0f147        k8s.gcr.io/k8s-dns-sidecar-amd64@sha256:9aab42bf6a2a068b797fe7d91a5d8d915b10dbbc3d6f2b10492848debfba6044         "/sidecar --v=2 --..."   About a minute ago   Up About a minute                       k8s_sidecar_kube-dns-6dcb57bcc8-2bmwt_kube-system_dffc0ae1-13ec-11e9-8e8e-0242ac11002f_0
016d0913197c        k8s.gcr.io/k8s-dns-dnsmasq-nanny-amd64@sha256:46b933bb70270c8a02fa6b6f87d440f6f1fce1a5a2a719e164f83f7b109f7544   "/dnsmasq-nanny -v..."   About a minute ago   Up About a minute                       k8s_dnsmasq_kube-dns-6dcb57bcc8-2bmwt_kube-system_dffc0ae1-13ec-11e9-8e8e-0242ac11002f_0
467d815959ff        k8s.gcr.io/k8s-dns-kube-dns-amd64@sha256:1a3fc069de481ae690188f6f1ba4664b5cc7760af37120f70c86505c79eea61d        "/kube-dns --domai..."   About a minute ago   Up About a minute                       k8s_kubedns_kube-dns-6dcb57bcc8-2bmwt_kube-system_dffc0ae1-13ec-11e9-8e8e-0242ac11002f_0
091393c7862f        e94d2f21bc0c         "/dashboard --inse..."   2 minutes ago        Up 2 minutes                            k8s_kubernetes-dashboard_kubernetes-dashboard-5498ccf677-b79k4_kube-system_dfedb486-13ec-11e9-8e8e-0242ac11002f_0
1072418f5779        k8s.gcr.io/pause-amd64:3.1         "/pause"                 2 minutes ago        Up 2 minutes                            k8s_POD_kube-dns-6dcb57bcc8-2bmwt_kube-system_dffc0ae1-13ec-11e9-8e8e-0242ac11002f_0
a6f80b3060f0        k8s.gcr.io/pause-amd64:3.1         "/pause"                 2 minutes ago        Up 2 minutes                            k8s_POD_kubernetes-dashboard-5498ccf677-b79k4_kube-system_dfedb486-13ec-11e9-8e8e-0242ac11002f_0
cce1b94f6656        4689081edb10         "/storage-provisioner"   2 minutes ago        Up 2 minutes                            k8s_storage-provisioner_storage-provisioner_kube-system_e0a96d0e-13ec-11e9-8e8e-0242ac11002f_0
2c67b8656b49        k8s.gcr.io/pause-amd64:3.1         "/pause"                 2 minutes ago        Up 2 minutes                            k8s_POD_storage-provisioner_kube-system_e0a96d0e-13ec-11e9-8e8e-0242ac11002f_0
b44e23384e1d        9c16409588eb         "/opt/kube-addons.sh"    2 minutes ago        Up 2 minutes                            k8s_kube-addon-manager_kube-addon-manager-minikube_kube-system_3afaf06535cc3b85be93c31632b765da_0
1ab907291f64        k8s.gcr.io/pause-amd64:3.1         "/pause"                 2 minutes ago        Up 2 minutes                            k8s_POD_kube-addon-manager-minikube_kube-system_3afaf06535cc3b85be93c31632b765da_0
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.0", GitCommit:"91e7b4fd31fcd3d5f436da26c980becec37ceefe", GitTreeState:"clean", BuildDate:"2018-06-27T20:17:28Z", GoVersion:"go1.10.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead", GitTreeState:"clean", BuildDate:"2018-04-10T12:46:31Z", GoVersion:"go1.9.4", Compiler:"gc", Platform:"linux/amd64"}

run first app

Let’s run our first app on Kubernetes with the kubectl run command. The run command creates a new deployment.

kubectl run kubernetes-bootcamp --image=gcr.io/google-samples/kubernetes-bootcamp:v1 --port=8080
$ docker ps
CONTAINER ID        IMAGE         COMMAND                  CREATED             STATUS              PORTS               NAMES
176ade40fc98        8fafd8af70e9         "/bin/sh -c 'node ..."   2 minutes ago       Up 2 minutes                            k8s_kubernetes-bootcamp_kubernetes-bootcamp-5c69669756-px485_default_910e933d-13ed-11e9-8e8e-0242ac11002f_0
a8403b0894f6        k8s.gcr.io/pause-amd64:3.1         "/pause"                 3 minutes ago       Up 2 minutes                            k8s_POD_kubernetes-bootcamp-5c69669756-px485_default_910e933d-13ed-11e9-8e8e-0242ac11002f_0
c9a996c0f147        k8s.gcr.io/k8s-dns-sidecar-amd64@sha256:9aab42bf6a2a068b797fe7d91a5d8d915b10dbbc3d6f2b10492848debfba6044         "/sidecar --v=2 --..."   7 minutes ago       Up 7 minutes                            k8s_sidecar_kube-dns-6dcb57bcc8-2bmwt_kube-system_dffc0ae1-13ec-11e9-8e8e-0242ac11002f_0
016d0913197c        k8s.gcr.io/k8s-dns-dnsmasq-nanny-amd64@sha256:46b933bb70270c8a02fa6b6f87d440f6f1fce1a5a2a719e164f83f7b109f7544   "/dnsmasq-nanny -v..."   7 minutes ago       Up 7 minutes                            k8s_dnsmasq_kube-dns-6dcb57bcc8-2bmwt_kube-system_dffc0ae1-13ec-11e9-8e8e-0242ac11002f_0
467d815959ff        k8s.gcr.io/k8s-dns-kube-dns-amd64@sha256:1a3fc069de481ae690188f6f1ba4664b5cc7760af37120f70c86505c79eea61d        "/kube-dns --domai..."   7 minutes ago       Up 7 minutes                            k8s_kubedns_kube-dns-6dcb57bcc8-2bmwt_kube-system_dffc0ae1-13ec-11e9-8e8e-0242ac11002f_0
091393c7862f        e94d2f21bc0c         "/dashboard --inse..."   7 minutes ago       Up 7 minutes                            k8s_kubernetes-dashboard_kubernetes-dashboard-5498ccf677-b79k4_kube-system_dfedb486-13ec-11e9-8e8e-0242ac11002f_0
1072418f5779        k8s.gcr.io/pause-amd64:3.1         "/pause"                 7 minutes ago       Up 7 minutes                            k8s_POD_kube-dns-6dcb57bcc8-2bmwt_kube-system_dffc0ae1-13ec-11e9-8e8e-0242ac11002f_0
a6f80b3060f0        k8s.gcr.io/pause-amd64:3.1         "/pause"                 7 minutes ago       Up 7 minutes                            k8s_POD_kubernetes-dashboard-5498ccf677-b79k4_kube-system_dfedb486-13ec-11e9-8e8e-0242ac11002f_0
cce1b94f6656        4689081edb10         "/storage-provisioner"   7 minutes ago       Up 7 minutes                            k8s_storage-provisioner_storage-provisioner_kube-system_e0a96d0e-13ec-11e9-8e8e-0242ac11002f_0
2c67b8656b49        k8s.gcr.io/pause-amd64:3.1         "/pause"                 7 minutes ago       Up 7 minutes                            k8s_POD_storage-provisioner_kube-system_e0a96d0e-13ec-11e9-8e8e-0242ac11002f_0
b44e23384e1d        9c16409588eb         "/opt/kube-addons.sh"    8 minutes ago       Up 8 minutes                            k8s_kube-addon-manager_kube-addon-manager-minikube_kube-system_3afaf06535cc3b85be93c31632b765da_0
1ab907291f64        k8s.gcr.io/pause-amd64:3.1         "/pause"                 8 minutes ago       Up 8 minutes                            k8s_POD_kube-addon-manager-minikube_kube-system_3afaf06535cc3b85be93c31632b765da_0

増えたのは: 176ade40fc98 8fafd8af70e9 "/bin/sh -c 'node ..." 2 minutes ago Up 2 minutes k8s_kubernetes-bootcamp_kubernetes-bootcamp-5c69669756-px485_default_910e933d-13ed-11e9-8e8e-0242ac11002f_0

Great! You just deployed your first application by creating a deployment. This performed a few things for you:

  • searched for a suitable node where an instance of the application could be run (we have only 1 available node)
  • scheduled the application to run on that Node
  • configured the cluster to reschedule the instance on a new Node when needed

To list your deployments use the get deployments command:

$ kubectl get deployments
NAME                  DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
kubernetes-bootcamp   1         1         1            1           7m

We see that there is 1 deployment running a single instance of your app. The instance is running inside a Docker container on your node.

view our app

今まで 内部ネットワークで動いています。 kubectl proxy を使って API endpoint を出します

Pods that are running inside Kubernetes are running on a private, isolated network. By default they are visible from other pods and services within the same kubernetes cluster, but not outside that network. When we use kubectl, we're interacting through an API endpoint to communicate with our application.

kubectl proxy (別 terminal window で)

curl http://localhost:8001/version
{
  "major": "1",
  "minor": "10",
  "gitVersion": "v1.10.0",
  "gitCommit": "fc32d2f3698e36b93322a3465f63a14e9f0eaead",
  "gitTreeState": "clean",
  "buildDate": "2018-04-10T12:46:31Z",
  "goVersion": "go1.9.4",
  "compiler": "gc",
  "platform": "linux/amd64"
}

The API server will automatically create an endpoint for each pod, based on the pod name, that is also accessible through the proxy. Pod ごとに API endpoint が作られる

$ kubectl get pods
NAME                                   READY     STATUS    RESTARTS   AGE
kubernetes-bootcamp-5c69669756-px485   1/1       Running   0          24m


$ export POD_NAME=$(kubectl get pods -o go-template --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')
$ echo Name of the Pod: $POD_NAME
Name of the Pod: kubernetes-bootcamp-5c69669756-px485

$ curl http://localhost:8001/api/v1/namespaces/default/pods/$POD_NAME/proxy/
Hello Kubernetes bootcamp! | Running on: kubernetes-bootcamp-5c69669756-px485 | v=1

Explore Your App

https://kubernetes.io/docs/tutorials/kubernetes-basics/explore/explore-intro/

Viewing Pods and Nodes

pods

A Pod is a Kubernetes abstraction that represents a group of one or more application containers (such as Docker or rkt), and some shared resources for those containers. Those resources include:

  • Shared storage, as Volumes
  • Networking, as a unique cluster IP address
  • Information about how to run each container, such as the container image version or specific ports to use

Pods are the atomic unit on the Kubernetes platform. When we create a Deployment on Kubernetes, that Deployment creates Pods with containers inside them (as opposed to creating containers directly).

https://kubernetes.io/docs/tutorials/kubernetes-basics/explore/explore-intro/

https://d33wubrfki0l68.cloudfront.net/fe03f68d8ede9815184852ca2a4fd30325e5d15a/98064/docs/tutorials/kubernetes-basics/public/images/module_03_pods.svg

Nodes

A Pod always runs on a Node. A Node is a worker machine in Kubernetes and may be either a virtual or a physical machine, depending on the cluster. Each Node is managed by the Master. A Node can have multiple pods, and the Kubernetes master automatically handles scheduling the pods across the Nodes in the cluster. The Master's automatic scheduling takes into account the available resources on each Node.

$ kubectl exec $POD_NAME env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=kubernetes-bootcamp-5c69669756-nbqkf
KUBERNETES_SERVICE_PORT_HTTPS=443
KUBERNETES_PORT=tcp://10.96.0.1:443
KUBERNETES_PORT_443_TCP=tcp://10.96.0.1:443
KUBERNETES_PORT_443_TCP_PROTO=tcp
KUBERNETES_PORT_443_TCP_PORT=443
KUBERNETES_PORT_443_TCP_ADDR=10.96.0.1
KUBERNETES_SERVICE_HOST=10.96.0.1
KUBERNETES_SERVICE_PORT=443
NPM_CONFIG_LOGLEVEL=info
NODE_VERSION=6.3.1
HOME=/root

kubectl exec -ti $POD_NAME bash

cat server.js

var http = require('http');
var requests=0;
var podname= process.env.HOSTNAME;
var startTime;
var host;
var handleRequest = function(request, response) {
  response.setHeader('Content-Type', 'text/plain');
  response.writeHead(200);
  response.write("Hello Kubernetes bootcamp! | Running on: ");
  response.write(host);
  response.end(" | v=1\n");
  console.log("Running On:" ,host, "| Total Requests:", ++requests,"| App Uptime:", (new Date() - startTime)/1000 , "seconds
", "| Log Time:",new Date());
}
var www = http.createServer(handleRequest);
www.listen(8080,function () {
    startTime = new Date();;
    host = process.env.HOSTNAME;
    console.log ("Kubernetes Bootcamp App Started At:",startTime, "| Running On: " ,host, "\n" );
});

pod内に色々情報を見る

root@kubernetes-bootcamp-5c69669756-nbqkf:/# curl localhost:8080
Hello Kubernetes bootcamp! | Running on: kubernetes-bootcamp-5c69669756-nbqkf | v=1

root@kubernetes-bootcamp-5c69669756-nbqkf:/# hostname
kubernetes-bootcamp-5c69669756-nbqkf

root@kubernetes-bootcamp-5c69669756-nbqkf:/# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
4: eth0@if5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:ac:12:00:02 brd ff:ff:ff:ff:ff:ff
    inet 172.18.0.2/24 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:acff:fe12:2/64 scope link
       valid_lft forever preferred_lft forever

Expose Your App Publicly

https://kubernetes.io/docs/tutorials/kubernetes-basics/expose/expose-intro/

https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/

Performing a Rolling Update

pod を確認

$ kubectl get pods
NAME                                   READY     STATUS    RESTARTS   AGE
kubernetes-bootcamp-5c69669756-b2vjq   1/1       Running   0          34s
kubernetes-bootcamp-5c69669756-dzzc8   1/1       Running   0          34s
kubernetes-bootcamp-5c69669756-pqj5t   1/1       Running   0          34s
kubernetes-bootcamp-5c69669756-tltfw   1/1       Running   0          34s

v2 に update

$ kubectl set image deployments/kubernetes-bootcamp kubernetes-bootcamp=jocatalin/kubernetes-bootcamp:v2
deployment.extensions/kubernetes-bootcamp image updated

pod を確認

$ kubectl get pods
NAME                                   READY     STATUS        RESTARTS   AGE
kubernetes-bootcamp-5c69669756-b2vjq   1/1       Terminating   0          1m
kubernetes-bootcamp-5c69669756-dzzc8   1/1       Terminating   0          1m
kubernetes-bootcamp-5c69669756-pqj5t   1/1       Terminating   0          1m
kubernetes-bootcamp-5c69669756-tltfw   1/1       Terminating   0          1m
kubernetes-bootcamp-7799cbcb86-5tjpm   1/1       Running       0          23s
kubernetes-bootcamp-7799cbcb86-mdgrx   1/1       Running       0          23s
kubernetes-bootcamp-7799cbcb86-svpt8   1/1       Running       0          22s
kubernetes-bootcamp-7799cbcb86-vqtdt   1/1       Running       0          21s
@dulao5
Copy link
Author

dulao5 commented Jan 24, 2019

$ ps auxwwfUSER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMANDroot         2  0.0  0.0      0     0 ?        S    10:36   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    10:36   0:00  \_ [ksoftirqd/0]root         5  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [kworker/0:0H]root         7  0.1  0.0      0     0 ?        S    10:36   0:04  \_ [rcu_sched]
root         8  0.0  0.0      0     0 ?        S    10:36   0:00  \_ [rcu_bh]
root         9  0.0  0.0      0     0 ?        S    10:36   0:00  \_ [migration/0]root        10  0.0  0.0      0     0 ?        S    10:36   0:00  \_ [watchdog/0]root        11  0.0  0.0      0     0 ?        S    10:36   0:00  \_ [watchdog/1]
root        12  0.0  0.0      0     0 ?        S    10:36   0:00  \_ [migration/1]
root        13  0.0  0.0      0     0 ?        S    10:36   0:00  \_ [ksoftirqd/1]
root        15  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [kworker/1:0H]
root        16  0.0  0.0      0     0 ?        S    10:36   0:00  \_ [kdevtmpfs]
root        17  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [netns]
root        18  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [perf]
root        19  0.0  0.0      0     0 ?        S    10:36   0:00  \_ [khungtaskd]
root        20  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [writeback]
root        21  0.0  0.0      0     0 ?        SN   10:36   0:00  \_ [ksmd]
root        22  0.0  0.0      0     0 ?        SN   10:36   0:00  \_ [khugepaged]
root        23  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [crypto]
root        24  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [kintegrityd]root        25  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [bioset]
root        26  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [kblockd]
root        27  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [ata_sff]
root        28  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [md]
root        29  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [devfreq_wq]
root        33  0.0  0.0      0     0 ?        S    10:36   0:00  \_ [kswapd0]
root        34  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [vmstat]
root        35  0.0  0.0      0     0 ?        S    10:36   0:00  \_ [fsnotify_mark]
root        36  0.0  0.0      0     0 ?        S    10:36   0:00  \_ [ecryptfs-kthrea]
root        52  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [kthrotld]
root        53  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [acpi_thermal_pm]
root        54  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [bioset]
root        55  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [bioset]
root        56  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [bioset]
root        57  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [bioset]
root        58  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [bioset]
root        59  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [bioset]
root        60  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [bioset]
root        61  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [bioset]
root        62  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [bioset]
root        63  0.0  0.0      0     0 ?        S    10:36   0:00  \_ [scsi_eh_0]
root        64  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [scsi_tmf_0]
root        65  0.0  0.0      0     0 ?        S    10:36   0:00  \_ [scsi_eh_1]
root        66  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [scsi_tmf_1]
root        72  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [ipv6_addrconf]
root        85  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [deferwq]
root        86  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [charger_manager]
root        87  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [bioset]
root       123  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [bioset]
root       124  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [bioset]
root       125  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [bioset]
root       126  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [bioset]
root       127  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [bioset]
root       128  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [kpsmoused]
root       129  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [bioset]
root       130  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [bioset]
root       131  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [bioset]
root       133  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [kworker/1:1H]
root       155  0.0  0.0      0     0 ?        S    10:36   0:00  \_ [jbd2/vda1-8]
root       156  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [ext4-rsv-conver]
root       185  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [kworker/0:1H]
root       215  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [rpciod]
root       217  0.0  0.0      0     0 ?        S    10:36   0:00  \_ [kauditd]
root       589  0.0  0.0      0     0 ?        S<   10:36   0:00  \_ [kvm-irqfd-clean]
root      5228  0.0  0.0      0     0 ?        S    11:08   0:00  \_ [kworker/u4:1]
root      5811  0.0  0.0      0     0 ?        S    11:12   0:00  \_ [kworker/0:1]
root      6619  0.0  0.0      0     0 ?        S    11:17   0:00  \_ [kworker/1:2]
root      7053  0.0  0.0      0     0 ?        S    11:20   0:00  \_ [kworker/0:3]
root      7251  0.0  0.0      0     0 ?        S    11:20   0:00  \_ [kworker/1:3]
root      7395  0.0  0.0      0     0 ?        S    11:20   0:00  \_ [kworker/u4:2]
root     10084  0.0  0.0      0     0 ?        S    11:27   0:00  \_ [kworker/0:0]
root     10118  0.0  0.0      0     0 ?        S    11:27   0:00  \_ [kworker/0:2]
root     10146  0.0  0.0      0     0 ?        S    11:27   0:00  \_ [kworker/1:0]
root     10493  0.0  0.0      0     0 ?        S    11:30   0:00  \_ [kworker/1:1]
root         1  0.2  0.2  37812  5840 ?        Ss   10:36   0:07 /sbin/init
root       258  0.0  0.1  44736  4104 ?        Ss   10:36   0:00 /lib/systemd/systemd-udevd
root       301  0.0  0.1  12204  4676 ?        Ss   10:36   0:00 /usr/sbin/haveged --Foreground --verbose=1 -w 1024
root       319  0.0  0.0  27076  1504 ?        Ss   10:36   0:03 /lib/systemd/systemd-journald
root       434  0.0  0.2 275884  6204 ?        Ssl  10:36   0:00 /usr/lib/accountsservice/accounts-daemon
message+   437  0.0  0.1  42900  3712 ?        Ss   10:36   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root       456  0.0  0.1  29008  2852 ?        Ss   10:36   0:00 /usr/sbin/cron -f
root       458  0.0  0.1  28544  2852 ?        Ss   10:36   0:00 /lib/systemd/systemd-logind
syslog     460  0.0  0.1 256392  3596 ?        Ssl  10:36   0:02 /usr/sbin/rsyslogd -n
root       481  0.0  0.9 157196 25192 ?        Ssl  10:36   0:00 /usr/lib/snapd/snapd
root       514  0.0  0.0  19472  2168 ?        Ss   10:36   0:00 /usr/sbin/irqbalance --pid=/var/run/irqbalance.pid
root       634  0.0  0.0  16120   856 ?        Ss   10:36   0:00 /sbin/dhclient -1 -v -pf /run/dhclient.ens3.pid -lf /var/lib/dhcp/dhclient.ens3.leases -I -df /var/lib/dhcp/dhclient6.ens3.leases ens3
root       759  0.3  2.2 1090712 56700 ?       Ssl  10:36   0:11 /usr/bin/dockerd -H fd://
root       807  0.0  0.4 426604 10928 ?        Ssl  10:36   0:02  \_ docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --shim docker-containerd-shim --runtime docker-runc --debug
root      7557  0.0  0.0 203992  2016 ?        Sl   11:20   0:00      \_ docker-containerd-shim c1ba4589ac18ba253ec20211e9832a40da449238fe0455566d24988e27d2e019 /var/run/docker/libcontainerd/c1ba4589ac18ba253ec20211e9832a40da449238fe0455566d24988e27d2e019 docker-runc
root      7573  0.0  0.0   1024     4 ?        Ss   11:20   0:00      |   \_ /pause
root      7615  0.0  0.0 135992  2368 ?        Sl   11:20   0:00      \_ docker-containerd-shim 8d6b0685ab4cc122a8cb197849daa77fd25f440f50b8784545b34aa9517a9e4b /var/run/docker/libcontainerd/8d6b0685ab4cc122a8cb197849daa77fd25f440f50b8784545b34aa9517a9e4b docker-runc
root      7632  0.0  0.0   6324  1740 ?        Ss   11:20   0:00      |   \_ /bin/bash /opt/kube-addons.sh
root     10440  0.0  0.0   1512     4 ?        S    11:29   0:00      |       \_ sleep 59
root      7786  0.0  0.1 146652  2708 ?        Sl   11:20   0:00      \_ docker-containerd-shim 15f9914a72c4e25bfb7c02800eead661d25f237324059e2c597df8175597b850 /var/run/docker/libcontainerd/15f9914a72c4e25bfb7c02800eead661d25f237324059e2c597df8175597b850 docker-runc
root      7804  0.0  0.0   1024     4 ?        Ss   11:20   0:00      |   \_ /pause
root      7867  0.0  0.0 211132  2448 ?        Sl   11:20   0:00      \_ docker-containerd-shim 0bd194efa7bb7f758ed6c5e016c5a07fb2e287084a93a123fb6aed959402ad25 /var/run/docker/libcontainerd/0bd194efa7bb7f758ed6c5e016c5a07fb2e287084a93a123fb6aed959402ad25 docker-runc
root      7886  0.0  0.0   4336   740 ?        Ss   11:20   0:00      |   \_ /bin/sh -c node server.js
root      7918  0.0  0.9 708220 23880 ?        Sl   11:20   0:00      |       \_ node server.js
root      7972  0.0  0.1 145244  2720 ?        Sl   11:20   0:00      \_ docker-containerd-shim 003b0d8e23034c375cc25da728c55f5d6cc98fae5e6dfd61ca11bc72a0e00a6e /var/run/docker/libcontainerd/003b0d8e23034c375cc25da728c55f5d6cc98fae5e6dfd61ca11bc72a0e00a6e docker-runc
root      7990  0.0  0.0   1024     4 ?        Ss   11:20   0:00      |   \_ /pause
root      8041  0.0  0.0 268120  2376 ?        Sl   11:20   0:00      \_ docker-containerd-shim 9232f691d48ad2521a1a53a3e65b482b156aea5f2bcc952b992630ac7e225868 /var/run/docker/libcontainerd/9232f691d48ad2521a1a53a3e65b482b156aea5f2bcc952b992630ac7e225868 docker-runc
root      8060  0.0  1.1  37788 27900 ?        Ssl  11:20   0:00      |   \_ /dashboard --insecure-bind-address=0.0.0.0 --bind-address=0.0.0.0
root      8119  0.0  0.1 202584  2696 ?        Sl   11:20   0:00      \_ docker-containerd-shim e17de741c9922434ba4cb5cca8bcfb1824bc180e9dc976524f084712a930d573 /var/run/docker/libcontainerd/e17de741c9922434ba4cb5cca8bcfb1824bc180e9dc976524f084712a930d573 docker-runc
root      8136  0.0  0.0   1024     4 ?        Ss   11:20   0:00      |   \_ /pause
root      8190  0.0  0.0 145244  2436 ?        Sl   11:20   0:00      \_ docker-containerd-shim efd1789f2b87a2317c613f932c364556fef46247bdc1665ea838d0acf446f74f /var/run/docker/libcontainerd/efd1789f2b87a2317c613f932c364556fef46247bdc1665ea838d0acf446f74f docker-runc
root      8207  0.0  0.0   1024     4 ?        Ss   11:20   0:00      |   \_ /pause
root      8268  0.0  0.0 145244  2416 ?        Sl   11:20   0:00      \_ docker-containerd-shim f2a96ef8f929fe2b2c9ad62ab1a1db794241e9d97ad1f95f74ff1fb21e28aa63 /var/run/docker/libcontainerd/f2a96ef8f929fe2b2c9ad62ab1a1db794241e9d97ad1f95f74ff1fb21e28aa63 docker-runc
root      8285  0.0  2.1 223820 53160 ?        Ssl  11:20   0:00      |   \_ /storage-provisioner
root      8346  0.0  0.0 210780  2432 ?        Sl   11:20   0:00      \_ docker-containerd-shim 4c62cb889b65497c7f17dd981550030968938e2aaebb012e8b1ad0675bdc8675 /var/run/docker/libcontainerd/4c62cb889b65497c7f17dd981550030968938e2aaebb012e8b1ad0675bdc8675 docker-runc
root      8364  0.0  0.8  37200 21660 ?        Ssl  11:20   0:00      |   \_ /kube-dns --domain=cluster.local. --dns-port=10053 --config-map=kube-dns --v=2
root      8434  0.0  0.1 137048  2700 ?        Sl   11:21   0:00      \_ docker-containerd-shim a752d2ba0a7f2417aa8c7fd288431d4f0f29d09c651cd714c9aa566fa25c1130 /var/run/docker/libcontainerd/a752d2ba0a7f2417aa8c7fd288431d4f0f29d09c651cd714c9aa566fa25c1130 docker-runc
root      8451  0.0  0.7  32168 19028 ?        Ssl  11:21   0:00      |   \_ /dnsmasq-nanny -v=2 -logtostderr -configDir=/etc/k8s/dns/dnsmasq-nanny -restartDnsmasq=true -- -k --cache-size=1000 --log-facility=- --server=/cluster.local/127.0.0.1#10053 --server=/in-addr.arpa/127.0.0.1#10053 --server=/ip6.arpa/127.0.0.1#10053
root      8490  0.1  0.0   1172   836 ?        S    11:21   0:00      |       \_ /usr/sbin/dnsmasq -k --cache-size=1000 --log-facility=- --server=/cluster.local/127.0.0.1#10053 --server=/in-addr.arpa/127.0.0.1#10053 --server=/ip6.arpa/127.0.0.1#10053
root      8507  0.0  0.0 202584  2428 ?        Sl   11:21   0:00      \_ docker-containerd-shim 88478ca0f6013e492f00b9143b0753099b4783d21ad06345f2a94f2789971675 /var/run/docker/libcontainerd/88478ca0f6013e492f00b9143b0753099b4783d21ad06345f2a94f2789971675 docker-runc
nobody    8524  0.1  0.9  35772 24696 ?        Ssl  11:21   0:00      |   \_ /sidecar --v=2 --logtostderr --probe=kubedns,127.0.0.1:10053,kubernetes.default.svc.cluster.local.,5,A --probe=dnsmasq,127.0.0.1:53,kubernetes.default.svc.cluster.local.,5,A
root      8756  0.0  0.1 145244  2712 ?        Sl   11:22   0:00      \_ docker-containerd-shim 7c16ca41421e857b184c8f09f2cbd83173de6f567640d11a061ffc081186ad4b /var/run/docker/libcontainerd/7c16ca41421e857b184c8f09f2cbd83173de6f567640d11a061ffc081186ad4b docker-runc
root      8774  0.0  0.0   1024     4 ?        Ss   11:22   0:00      |   \_ /pause
root      8923  0.0  0.1 146652  2720 ?        Sl   11:22   0:00      \_ docker-containerd-shim 8283a21bea486a39924a7345da93145db9ee4077093e9d157c58990442584276 /var/run/docker/libcontainerd/8283a21bea486a39924a7345da93145db9ee4077093e9d157c58990442584276 docker-runc
root      8943  0.0  0.0   4336   700 ?        Ss   11:22   0:00          \_ /bin/sh -c node server.js
root      8970  0.0  0.9 708220 24232 ?        Sl   11:22   0:00              \_ node server.js
root       780  0.0  0.0  15936  1816 tty1     Ss+  10:36   0:00 /sbin/agetty --noclear tty1 linux
root       787  0.0  0.2  65508  6172 ?        Ss   10:36   0:00 /usr/sbin/sshd -D
root      6964  0.0  0.2  92792  6712 ?        Ss   11:20   0:00  \_ sshd: root@pts/0
root      6982  0.0  0.3  27672 10092 pts/0    Ss   11:20   0:00      \_ -bash
root     10524  0.0  0.1  37516  3460 pts/0    R+   11:30   0:00          \_ ps auxwwf
ntp        791  0.0  0.1 110032  4920 ?        Ssl  10:36   0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 109:116
root      6968  0.0  0.1  36936  4696 ?        Ss   11:20   0:00 /lib/systemd/systemd --user
root      6970  0.0  0.0  61264  2004 ?        S    11:20   0:00  \_ (sd-pam)
root      7108  8.9 20.0 11522444 507564 ?     Ssl  11:20   0:55 /usr/local/bin/localkube --dns-domain=cluster.local --node-ip=172.17.0.34 --generate-certs=false --logtostderr=true --enable-dns=false
$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment