A. Kubenetes is a container for cloud computing framework choreography , responsible for managing the container life cycle, resources, networks, services and so on.
II. Interpretation nouns
Pod: k8s smallest unit contains a mirror close relationship.
Node: From the node, the load pod.
Master: the master node, the pod api management interface management, scheduling, control.
Etcd: k8s storage, key / value form, main pod updated state, node-> pod route port mapping.
Kubectl: encapsulation of k8s pod command user interface.
Kubelet: management of the pod's life cycle.
Api-server: REST interface services component specification.
Flannel: communication between network components, is responsible for a host.
Kube-proxy: service discovery component responsible for external traffic routing agent.
SVC (server): service provided by the external container.
RC: replication controller-> A controller is responsible for the creation and management of the pod.
III. Scenarios
1. modify environment variables
a.rc |grep {pod_name}
b.kubectl edit rc {pod_name-rc Name}
c. End modify save and exit
d.pod |grep {pod_name}
e.kubectl delete pod {pod_name}
2. Provide external traffic to port services
. A service profile Found: find / opt / bin -name ". * {Pod_name} * yaml"
b Editor:. vim {pod_name-service} .yaml
c.type to form NodePort
d. Save the exit, kubectl delete -f {pod_name-service} .yaml
e.kubectl create –f {pod_name-service}.yaml
f. kubectl apply–f {pod_name-service}.yaml
3. Redis provides access to the external port 16379
a. above, find redis-service.yaml
. B edit, add: NodePort: 16379
c. Save and exit,
d.kubectl delete –f redis-service.yaml
e.kubectl create –f redis-service.yaml
f. kubectl apply –f redis-service.yaml
the above.