vmware / vmware/photon

Kubernetes api server configuration file in documents is missing some required parameters

Open
#1,305 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
3.2k
Forks
692
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

I'm following the documents on https://vmware.github.io/photon/docs/user-guide/kubernetes-on-photon-os/running-kubernetes-on-photon-os/configure-kubernetes-on-master/ and attempting to configure and start the api-server using config file /etc/kubernetes/apiserver which defines flags for the service target.

The documents specify KUBE_API_ADDRESS should be set however --address flag is deprecated according to the error log and it is missing some flags as reported when i try to start the service:

--service-account-signing-key-file and --service-account-issuer

Reproduction steps
1.Configure /etc/kubernetes/apiserver with the following text as per the doco:

# The address on the local server to listen to.
KUBE_API_ADDRESS="--address=0.0.0.0"

# Comma separated list of nodes in the etcd cluster
KUBE_ETCD_SERVERS="--etcd-servers=http://127.0.0.1:4001"

# Address range to use for services
KUBE_SERVICE_ADDRESSES="--service-cluster-ip-range=10.254.0.0/16"

# Add your own
KUBE_API_ARGS=""

2.Attempt to start api server:

[ ~ ]# systemctl start kube-apiserver.service
Job for kube-apiserver.service failed because the control process exited with error code.
See "systemctl status kube-apiserver.service" and "journalctl -xe" for details.

3. View output from journalctl -xe

...
Mar 16 06:57:54 mtck8m001 kube-controller-manager[175]: E0316 06:57:54.598769     175 leaderelection.go:330] error retrieving resource lock kube-system/kube-controller-manager: Get "http://mtck8m001.globaler>
Mar 16 06:57:54 mtck8m001 kube-apiserver[782]: Flag --address has been deprecated, This flag has no effect now and will be removed in v1.24.
Mar 16 06:57:54 mtck8m001 kube-apiserver[782]: I0316 06:57:54.636658     782 server.go:553] external host was not specified, using 172.30.209.42
Mar 16 06:57:54 mtck8m001 kube-apiserver[782]: W0316 06:57:54.636757     782 authentication.go:524] AnonymousAuth is not allowed with the AlwaysAllow authorizer. Resetting AnonymousAuth to false. You should use a different authorizer
Mar 16 06:57:54 mtck8m001 kube-apiserver[782]: Error: [service-account-issuer is a required flag, --service-account-signing-key-file and --service-account-issuer are required flags]
Mar 16 06:57:54 mtck8m001 systemd[1]: kube-apiserver.service: Main process exited, code=exited, status=1/FAILURE
...
Expected behavior

Expected service kube-apiserver.service to start.

I think there are additional configuration requirements perhaps with the latest packaged version. Apologies as I'm very new to kubernetes installation and was hoping for a quick start with this guide. If I can get this working I'm happy to post an update.

Many thanks.

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the documentation page linked in the issue and the /etc/kubernetes/apiserver configuration it reproduces. Compare the documented kube-apiserver flags with the packaged version's startup errors, especially the deprecated --address flag and required service-account settings. Done means the guide contains configuration that allows kube-apiserver.service to start.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes
Domain
devops, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.