Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upKubernetes commands #85776
Comments
This comment has been minimized.
This comment has been minimized.
/sig cli These SIGs are my best guesses for this issue. Please comment |
This comment has been minimized.
This comment has been minimized.
hi, you might want to post these commands on https://www.reddit.com/r/kubernetes/ this is an issue tracker and a lot of users will not see your post here. |
This comment has been minimized.
This comment has been minimized.
/remove-sig cli |
This comment has been minimized.
This comment has been minimized.
@kenotsolutions: There are no sig labels on this issue. Please add a sig label by either:
Note: Method 1 will trigger an email to the group. See the group list. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This comment has been minimized.
This comment has been minimized.
@kenotsolutions: Those labels are not set on the issue: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This comment has been minimized.
This comment has been minimized.
/remove-sig cli |
This comment has been minimized.
This comment has been minimized.
@kenotsolutions: Those labels are not set on the issue: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This comment has been minimized.
This comment has been minimized.
If you'd like to contribute this to documentation, I'd suggest opening an issue or PR against https://github.com/kubernetes/website/ and tagging sig-cli /close |
This comment has been minimized.
This comment has been minimized.
@liggitt: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This comment has been minimized.
This comment has been minimized.
kubectl exec -n kube-system etdc-master -- sh -c"ETCDCTL_API=3 etcdctl --endpoints=https://[127.0.0.1]:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt --key=/etc/kubernetes/pki/etcd/healthcheck-client.key snapshot save /etc/kubernetes/pki/snapshotdb |
This comment has been minimized.
This comment has been minimized.
`1. Create a Namespace for the user kubectl create namespace office
openssl genrsa -out employee.key 2048
openssl req -new -key employee.key -out employee.csr -subj "/CN=employee/O=personal"
cat <<EOF | kubectl apply -f -
kubectl certificate approve employee.office
kubectl get csr employee.office -o jsonpath='{.status.certificate}' | base64 --decode > employee.crt
kubectl config set-credentials employee --client-certificate=employee-direct.crt --client-key=employee.key --embed-certs=true kubectl config set-context employee-context --cluster=kubernetes --namespace=office --user=employee kubectl --context=employee-context get pods --v=9` |
This comment has been minimized.
This comment has been minimized.
Step 1: Create a new private key and CSR openssl genrsa -out zeal.key 2048 Step 2: Encode the csr cat zeal.csr | base64 | tr -d '\n' Step 3: Generate the Kubernetes Signing Request apiVersion: certificates.k8s.io/v1beta1 system:authenticated kubectl apply -f signingrequest.yaml Step 5: Approve the csr kubectl certificate approve zeal-csr Step 6: Download the Certificate from csr kubectl get csr zeal-csr -o jsonpath='{.status.certificate}' | base64 -d > zeal.crt Step 7: Create a new context kubectl config set-credentials zeal --client-certificate=zeal.crt --client-key=zeal.key Step 8: Set new Context kubectl config set-context zeal-context --cluster do-blr1-kplabs-k8s --user=zeal Step 9: Use Context to Verify kubectl --context=zeal-context get pods |
https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-a4
Some USEFUL Commands from Denny Zhang.
/remove-sig cli
/triage support