Using kubectl and YAML
kubectl is the officially supported command-line tool for accessing the Kubernetes API. It can be installed on Linux, macOS, or Windows.
Setting up kubectl and kubeconfig
To install the newest release of kubectl, you can use the installation instructions at https://kubernetes.io/docs/tasks/tools/install-kubectl/.
Once kubectl is installed, it needs to be set up to authenticate with one or more clusters. This is done using the kubeconfig
file, which looks like this:
Example-kubeconfig
apiVersion: v1 kind: Config preferences: {} clusters: - cluster:     certificate-authority: fake-ca-file     server: https://1.2.3.4   name: development users: - name: alex   user:     password: mypass     username: alex contexts: - context:     cluster: development     namespace: frontend     user: developer...