kubernetes.io > Documentation > Reference > kubectl CLI > kubectl Cheat Sheet
kubernetes.io > Documentation > Tasks > Monitoring, Logging, and Debugging > Get a Shell to a Running Container
kubernetes.io > Documentation > Tasks > Access Applications in a Cluster > Configure Access to Multiple Clusters
kubernetes.io > Documentation > Tasks > Access Applications in a Cluster > Accessing Clusters using API
kubernetes.io > Documentation > Tasks > Access Applications in a Cluster > Use Port Forwarding to Access Applications in a Cluster
show
# create a file named my-configmap.yml
apiVersion: v1
kind: ConfigMap
metadata:
name: my-configmap
data:
key1: Hello, world!
key2: |
Test
multiple lines
more lines
# create the confimap from the file my-configmap.yml
kubectl apply -f my-configmap.yml
# view the configmap data in the cluster
kubectl describe configmap my-configmap
show
# create two base64 encoded strings
echo -n 'secret' | base64
echo -n 'anothersecret' | base64
# create a file named secret.yml
apiVersion: v1
kind: Secret
metadata:
name: my-secret
type: Opaque
data:
secretkey1: <base64 String 1>
secretkey2: <base64 String 2>
# create a secret
kubectl create -f secretl.yml