CKA &. CKAD (104) 썸네일형 리스트형 Secret Two Way Imperative Method kubectl create secret generic --from-literal== kubectl create secret generic \ app-secret --from-literal=DB_Host=mysql \ --from-literal=DB_User=root --from-literal=DB_Password=paswrd kubectl create secret generic --from-file= kubectl create secret generic \ app-secret --from-file=app_secret.properties Declarative Method kubectl create -f secret-data.yaml apiVersion: v1 .. ConfigMap Practice Test ㅁ How many PODs exist on the system? kubectl get pods ㅁ What is the environment variable name set on the container in the pod? kubectl describe pod webapp-color ㅁ Update the environment variable on the POD to display a 'green' background kubectl get pod web-app -o yaml > pod-definition.yaml 이후 필요 부분 수정 ㅁ How many ConfigMaps exist in the environment? kubectl get configmaps ㅁ Identify the database.. Configure Environment Variable in Applications docker run -e APP_COLOR=pink simple-webapp-color pod-definition.yaml apiVersion: v1 kind: Pod metadata: name: simple-webapp-color spec: containers: - name: simple-webapp-color image: simple-webapp-color ports: - containerPort: 8080 env: - name: APP_COLOR value: pink APP_COLOR: blue APP_MODE: prod 1st Create ConfigMap [imperative] kubectl create configmap --from-literal== 예시 kubectl create config.. Application Commands & Argument and Practice Test docker run ubuntu docker ps docker ps -a Nignx Docker File # Install Nginx. RUN \ add-apt-repository -y ppa:nginx/stable && \ apt-get update && \ apt-get install -y nginx && \ rm -rf /var/lib/apt/lists/* && \ echo "\ndaemon off;" >> /etc/nginx/nginx.conf && \ chown -R www-data:www-data /var/lib/nginx # Define mountable directories. VOLUME ["/etc/nginx/sites-enabled", "/etc/nginx/certs", "/etc/ng.. Rolling Update and Rollout [Summarize Command] ㅁ Create kubectl create -f deployoment-definition.yml ㅁ Get kubectl get deployments ㅁ Update kubectl apply -f deployment-definition.yml kubectl set image deployment/myapp-deployment nginx=nginx:1.9.1 ㅁ Status kubectl rollout status deployment/myapp-deployment kubectl rollout history deployment/myapp-deployment ㅁ Rollback kubectl rollout undo deployment/myapp-deployment [Pract.. Application Logs Logs - Docker docker run -d kodekloud/event-simulator docker logs -f ecf Logs - Kubernetes event-simulator.yaml apiVersion: v1 kind: Pod metadata: name: event-simulator-pod spec: containers: - name: event-simulator image: kodekloud/event-simulator kubectl create -f event-simulator.yaml kubectl logs -f event-simulator-pod event-simulator.yaml apiVersion: v1 kind: Pod metadata: name: event-simulat.. Monitoring Cluster Component minikube minikube addons enable metrics-server others git clone https://github.com/kubernetes-incubator/metrics-serve kubectl create -f deploy/1.8+/ [View] kubectl top node kubectl top pod [Practice Test] ㅁ We have deployed a few PODs running workloads. Inspect it kubectl get pod ㅁ Let us deploy metrics-server to monitor the PODs and Nodes. Pull the git repository for the deployment files git cl.. Configuring Kubernetes Scheduler ㅁ Deploy Additional Scheduler wget https://storage.googleapis.com/kubernetes-release/release/v1.12.0/bin/linux/amd64/kube-scheduler kube-scheduler.service ExecStart=/usr/local/bin/kube-scheduler \\ --config=/etc/kubernetes/config/kube-scheduler.yaml \\ --scheduler-name=default-scheduler my-custom-scheduler.service ExecStart=/usr/local/bin/kube-scheduler \\ --config=/etc/kubernetes/config/kube-sc.. 이전 1 ··· 7 8 9 10 11 12 13 다음