Last active
November 7, 2020 20:43
-
-
Save brucedkyle/4d99a5a224c2ed607ab4b52a781eaf58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: redis | |
spec: | |
containers: | |
- name: redis | |
image: redis | |
volumeMounts: | |
- name: redis-storage | |
mountPath: /data/redis | |
volumes: | |
- name: redis-storage | |
emptyDir: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl delete deployment test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl describe pod nginx-app-6cc6d7964d-rvkwr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get pods test -o yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get pods -o wide |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: hello | |
spec: | |
template: | |
# This is the pod template | |
spec: | |
containers: | |
- name: hello | |
image: busybox | |
command: ['sh', '-c', 'echo "Hello, Kubernetes!" && sleep 3600'] | |
restartPolicy: OnFailure | |
# The pod template ends here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl run mysecondpod --image=nginx --dry-run=client -o yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spec: | |
containers: | |
- image: nginx | |
imagePullPolicy: Always | |
name: test | |
ports: | |
- containerPort: 80 | |
protocol: TCP | |
resources: {} | |
terminationMessagePath: /dev/termination-log | |
terminationMessagePolicy: File | |
volumeMounts: | |
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount | |
name: default-token-zjrn4 | |
readOnly: true | |
dnsPolicy: ClusterFirst | |
enableServiceLinks: true | |
nodeName: aks-agentpool-13037616-vmss000000 | |
priority: 0 | |
restartPolicy: Always | |
schedulerName: default-scheduler | |
securityContext: {} | |
serviceAccount: default | |
serviceAccountName: default | |
terminationGracePeriodSeconds: 30 | |
tolerations: | |
- effect: NoExecute | |
key: node.kubernetes.io/not-ready | |
operator: Exists | |
tolerationSeconds: 300 | |
- effect: NoExecute | |
key: node.kubernetes.io/unreachable | |
operator: Exists | |
tolerationSeconds: 300 | |
volumes: | |
- name: default-token-zjrn4 | |
secret: | |
defaultMode: 420 | |
secretName: default-token-zjrn4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl run test --image=nginx --port=80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment