Skip to content

Latest commit

 

History

History
67 lines (49 loc) · 1.93 KB

app_lifecycle.md

File metadata and controls

67 lines (49 loc) · 1.93 KB

Cluster Maintenance (11%)

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

Create a configmap named my-configmap with two values, one single line and one multi-line

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

Create a secret via yaml that contains two base64 encoded values

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