SIMULATION
Create a deployment spec file that will:
Launch 7 replicas of the nginx Image with the label app_runtime_stage=dev
deployment name: kual00201
Save a copy of this spec file to /opt/KUAL00201/spec_deployment.yaml (or /opt/KUAL00201/spec_deployment.json).
When you are done, clean up (delete) any new Kubernetes API object that you produced during this task.
SIMULATION
Create a pod as follows: Name: non-persistent-redis container Image: redis Volume with name: cache-control Mount path: /data/redis The pod should launch in the staging namespace and the volume must not be persistent.
SIMULATION
Set the node named ek8s-node-1 as unavailable and reschedule all the pods running on it.
SIMULATION
Configure the kubelet systemd- managed service, on the node labelled with name=wk8s-node-1, to launch a pod containing a single container of Image httpd named webtool automatically. Any spec files required should be placed in the /etc/
kubernetes/manifests directory on the node.
You can ssh to the appropriate node using:
[student@node-1] $ ssh wk8s-node-1
You can assume elevated privileges on the node with the following command:
[student@wk8s-node-1] $ | sudo -i
SIMULATION
Given a partially-functioning Kubernetes cluster, identify symptoms of failure on the cluster.
Determine the node, the failing service, and take actions to bring up the failed service and restore the health of the cluster. Ensure that any changes are made permanently.
You can ssh to the relevant I nodes (bk8s-master-0 or bk8s-node-0) using:
[student@node-1] $ ssh
You can assume elevated privileges on any node in the cluster with the following command:
[student@nodename] $ | sudo -i
Create a pod with environment variables as var1=value1.Check the environment variable in pod
SIMULATION
Task
Create a new NetworkPolicy named allow-port-from-namespace in the existing namespace echo. Ensure that the new NetworkPolicy allows Pods in namespace my-app to connect to port 9000 of Pods in namespace echo.
Further ensure that the new NetworkPolicy:
1.
does not allow access to Pods, which don't listen on port 9000
2.
does not allow access from Pods, which are not in namespace my-app